<?php
include_once "init.php";
include_once "func/rand.php";

$tree=new AvlTree();
// echo $tree->output();

// $tree->insertMulti(1,2,3,4,5,6,7,8,9,10);
// echo $tree->output();
// $tree->insertMulti(30,29,28,27,26,25,24,23,22,21);
// echo $tree->output();
// $tree->insertMulti(16,20,17,19,14,11,18,13,15,12);
// echo $tree->output();

// echo $tree->output($tree->root->right);

$rand_list=randUniqueIntList2(1000);
$tree->insertList($rand_list);
$svg=new BinaryTreeSVG();
echo $svg->fetch($tree->root,60,60,25,1,-20);
